/* ============================================================
   БЛОК ANSWERS («Поширені запитання», FAQ-акордеон)
   Підключення:
   <link rel="stylesheet" type="text/css" href="{{ asset('public/assets\css\frontend\New_website\answers.css') }}">
   Потрібен також скрипт:
   <script src="{{ asset('assets\js\website\answers.js') }}"></script>

   Брейкпоінти:
   - ПК (за замовчуванням)          > 1440px
   - ноутбук / планшет альбомний    <= 1440px
   - планшет портретний             <= 1024px
   - телефон                        <= 768px
   ============================================================ */

.cases-answers {
    position: relative;
    width: 100%;
    max-width: 1920px;
    background-color: #FFFFFF;
    display: flex;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    box-sizing: border-box;
    padding: 80px 0 90px;
}

.answers-container {
    width: 100%;
    max-width: 1060px;
}

/* ---------- шапка: заголовок + вкладки ---------- */

.answers-head {
    display: flex;
    align-items: center;
    gap: 56px;
    margin-bottom: 36px;
}

.answers-title {
    margin: 0;
    font-weight: 800;
    font-size: 27px;
    line-height: 33px;
    color: #1D1A37;
}

.answers-tabs {
    display: flex;
    align-items: center;
    gap: 36px;
}

.answers-tab {
    position: relative;
    background: none;
    border: none;
    padding: 6px 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 15px;
    line-height: 19px;
    color: #9AA3B2;
    cursor: pointer;
    transition: color 0.2s;
}

.answers-tab:hover { color: #2196FF; }

/* активна вкладка: темна з помаранчевим підкресленням */
.answers-tab.is-active {
    color: #1D1A37;
    font-weight: 700;
}

.answers-tab.is-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 1px;
    background: #E8A824;
}

/* ---------- групи питань (по вкладках) ---------- */

.answers-group { display: none; }
.answers-group.is-active { display: block; }

/* ---------- елемент акордеона ---------- */

.answers-item {
    position: relative;
    margin-bottom: 18px;
    border-radius: 8px;
    background: #F7F8F9;
    border: 1px solid #F7F8F9;
    overflow: hidden;
    transition: background 0.25s, border-color 0.25s;
}

.answers-item:last-child { margin-bottom: 0; }

/* наведення на закрите питання — світло-блакитна картка */
.answers-item:not(.is-open):hover {
    background: #E8F4FE;
    border-color: #2A90FF;
}

.answers-item:not(.is-open):hover .answers-q { color: #2196FF; }

/* кнопка-питання */
.answers-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    padding: 22px 26px;
    box-sizing: border-box;
    background: none;
    border: none;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 21px;
    color: #1D1A37;
    cursor: pointer;
    transition: color 0.25s;
}

.answers-q svg {
    flex-shrink: 0;
    transition: transform 0.3s, stroke 0.3s;
}

.answers-q svg path { stroke: #2196FF; transition: stroke 0.3s; }

/* відповідь: плавне розкриття через grid-rows */
.answers-a {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
}

.answers-a-inner { overflow: hidden; }

.answers-a-inner p {
    margin: 0;
    padding: 0 26px 24px;
    font-weight: 500;
    font-size: 15px;
    line-height: 24px;
    color: #3A4358;
}

/* ---------- розкритий елемент ---------- */

.answers-item.is-open {
    background: #FFFFFF;
    border-color: #7FBCF5;
}

/* синя вертикальна риска ліворуч */
.answers-item.is-open::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #2196FF;
}

.answers-item.is-open .answers-q { color: #4AA3F7; }

.answers-item.is-open .answers-q svg { transform: rotate(180deg); }
.answers-item.is-open .answers-q svg path { stroke: #9AA3B0; }

.answers-item.is-open .answers-a { grid-template-rows: 1fr; }

/* ============================================================
   НОУТБУК / ПЛАНШЕТ АЛЬБОМНИЙ  (<= 1440px)
   ============================================================ */
@media (max-width: 1440px) {
    .cases-answers { padding: 60px 32px 72px; }
}

/* ============================================================
   ПЛАНШЕТ ПОРТРЕТНИЙ  (<= 1024px)
   ============================================================ */
@media (max-width: 1024px) {

    .cases-answers { padding: 48px 24px 56px; }

    .answers-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        margin-bottom: 26px;
    }

    .answers-title { font-size: 24px; line-height: 30px; }
}

/* ============================================================
   ТЕЛЕФОН  (<= 768px)
   ============================================================ */
@media (max-width: 768px) {

    .cases-answers { padding: 36px 16px 44px; }

    .answers-title { font-size: 20px; line-height: 26px; }

    .answers-tabs { gap: 22px; flex-wrap: wrap; }
    .answers-tab { font-size: 14px; }

    .answers-item { margin-bottom: 12px; }

    .answers-q {
        padding: 16px 18px;
        font-size: 14px;
        line-height: 19px;
    }

    .answers-a-inner p {
        padding: 0 18px 18px;
        font-size: 13px;
        line-height: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .answers-a,
    .answers-q svg { transition: none; }
}